<template>
  <div class="person">
    <h2>求和:{{ sum }}</h2>
    <h2>放大10倍后{{ bigSum }}</h2>
    <button @click="add">点我+1</button>
    <hr>
    <img v-for="(dog, index) in dogs" :key="index" :src="dog" alt="">
    <button @click="addDog">再来一只小狗</button>
  </div>
</template>

<script lang="ts" setup>
import useSum from '@/hooks/useSum';
import useDog from '@/hooks/useDog';

const { sum, add, bigSum } = useSum()
const { dogs, addDog } = useDog()
</script>

<style scoped>
.person {
  background-color: #444fb4;
  box-shadow: 0 0 10px;
  border-radius: 10px;
  padding: 20px;
}

li {
  font-size: 20px;
}

button {
  margin: 0 10px auto;
}

img {
  height: 100px;
  margin: 10px;
}
</style>
